package com.agile.leetcode.tree;

import java.util.List;
import java.util.Set;

/**
 *     1
 *  *        / \
 *  *       2   3
 *  *      /   / \
 *  *     4   2   4
 *  *        /
 *  *       4
 */
public class RepeatTest {
    public static void main(String[] args) {
        //
        Node node9=new Node("4",null,null);
        //
        Node node7=new Node("4",node9,null);
        Node node6=new Node("2",node7,null);
        Node node5=new Node("4",null,null);
        Node node4=new Node("3",node6,node5);
        //
        Node node8=new Node("4",null,null);
        //
        Node node3=new Node("4",node8,null);
        Node node2=new Node("2",node3,null);
        Node node1=new Node("1",node2,node4);
        RepeatTree repeatTree=new RepeatTree();
        Set<String> set = repeatTree.preNode(node1);
        List<String> list = repeatTree.getList();
        System.out.println(list);
        System.out.println(set);
        Set<String> set1 = repeatTree.getSet(list);
        System.out.println(set1);
    }
}
